helloApp.config(function($stateProvider, $urlRouterProvider, $controllerProvider) {

	$stateProvider.state('root.admin.home', {
			url: "/home",
			views: {
				content: {
					templateUrl : "/app/private/home/view/home.html",
					controller : "HomeCtrl"
				}
			}
		});
});

helloApp.controller('HomeCtrl', function ($scope, $http, ngTableParams) {

    $scope.list1 = [{title: 'Test1', drag: true},{title: 'Test2', drag: true},{title: 'Test3', drag: true},{title: 'Test4', drag: true}];
    $scope.list2 = [{title: 'Test5', drag: true},{title: 'Test6', drag: true}];

    var data = [{name: "Moroni", age: 50},
                    {name: "Tiancum", age: 43},
                    {name: "Jacob", age: 27},
                    {name: "Nephi", age: 29},
                    {name: "Enos", age: 34},
                    {name: "Tiancum", age: 43},
                    {name: "Jacob", age: 27},
                    {name: "Nephi", age: 29},
                    {name: "Enos", age: 34},
                    {name: "Tiancum", age: 43},
                    {name: "Jacob", age: 27},
                    {name: "Nephi", age: 29},
                    {name: "Enos", age: 34},
                    {name: "Tiancum", age: 43},
                    {name: "Jacob", age: 27},
                    {name: "Nephi", age: 29},
                    {name: "Enos", age: 34}];

        $scope.tableParams = new ngTableParams({
            //page: 1,            // show first page
            count: data.length           // count per page
        }, {
            counts: [],
            total: data.length,
            getData: function($defer, params) {
                $defer.resolve(data.slice((params.page() - 1) * params.count(), params.page() * params.count()));
            }
        });
});